package com.example.day18;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;

/**
 * @author Lenovo
 */
public class CopyJavaDemo02 {
    public static void main(String[] args) throws IOException, java.io.IOException {
        FileReader fr = new FileReader("myCharStream\\ConversionStreamDemo.java");
        FileWriter fw = new FileWriter("myCharStream\\Copy.java");
     char[] chs = new char[1024];
    int len;
        while ((len=fr.read(chs))!=-1) {
            fw.write(chs, 0, len);
        }
        fw.close();
        fr.close();
    }
}
